<script setup>
import { artGetChannelsService } from '@/api/article'
import { ref, defineModel, onMounted } from 'vue'
const modelValue = defineModel()

const channelList = ref([])
const getChannelList = async () => {
    const res = await artGetChannelsService()
    channelList.value = res.data
    // console.log(channelList.value)
}
onMounted(async() => {
    await getChannelList()
})

</script>
<template>
    <el-select v-model="modelValue">
        <el-option v-for="channel in channelList" :key="channel.id" :label="channel.cate_name"
            :value="channel.id"></el-option>
    </el-select>
</template>